package Java8实战._2_Stream_使用流._7_构建流;

import org.junit.jupiter.api.Test;

import java.util.stream.Stream;

public class _4_创建无限流_1_迭代_测试 {

    @Test
    public void Test(){
        Stream.iterate(new int[]{0,1}, t -> new int[]{t[1], t[0] + t[1]})
                .limit(10)
                .map(t -> t[0])
                .forEach(t -> System.out.print(t + " "));
    }










}





























